<?php
/**
 * 菜单资源对应
 */
return [
    'channels' => [
        // 'users'    => '用户管理',
        'system' => '系统设置',
        'contents' => '内容管理',
        'marketing' => '营销管理',
    ],
    'menus' => [
        //模块
        //系统设置
        'system' => [
            //二级菜单
            '站点设置' => [
                //三级菜单
                '基本信息' => [
                    'url' => 'm-admin/sites_config/edit',
                    'resource' => 'm-admin/sites_config',
                    'action' => ['edit', 'update'],
                ],
            ],
            '管理员设置' => [
                '角色设置' => [
                    'url' => 'm-admin/setting/resource_acl/index',
                    'resource' => 'm-admin/setting/resource_acl',
                    'action' => ['index'],
                    'groups' => [
                        [
                            'title' => '添加、编辑',
                            'action' => ['save'],
                        ],
                        [
                            'title' => '删除',
                            'action' => ['del'],
                        ],
                        [
                            'title' => '角色权限',
                            'action' => ['role_resources'],
                        ],
                    ],
                ],
                '人员管理' => [
                    'url' => 'm-admin/setting/site_admin/index',
                    'resource' => 'm-admin/setting/site_admin',
                    'action' => ['index'],
                ],
            ],
        ],
        //内容管理
        'contents' => [
            //二级菜单
            '文章'    =>  [
                '文章列表'  =>[
                    'url'   =>  'm-admin/articles/index',
                    'resource'  =>  'm-admin/articles',
                    'action'    =>  ['index'],
                    'groups' => [
                        [
                            'title' => '添加',
                            'action' => ['add', 'save'],
                        ],
                        [
                            'title' => '编辑',
                            'action' => ['edit', 'save'],
                        ],
                    ]
                ],
                '新增文章' => [
                    'url' => 'm-admin/articles/add',
                    'resource' => 'm-admin/companies',
                    'action' => ['add', 'save'],
                ]
            ],
            '活动管理' => [
                '未开始活动' => [
                    'url' => 'm-admin/activity/index?started=0',
                    'resource' => 'm-admin/activity',
                    'action' => ['not_started'],
                ],
                '开放销售活动' => [
                    'url' => 'm-admin/activity/index?is_sold=1',
                    'resource' => 'm-admin/activity',
                    'action' => ['on_line'],

                ],
                '停止销售活动' => [
                    'url' => 'm-admin/activity/index?is_sold=0',
                    'resource' => 'm-admin/activity',
                    'action' => ['offline'],
                ],
                '被删除' => [
                    'url' => 'm-admin/activity/index?is_del=1',
                    'resource' => 'm-admin/activity',
                    'action' => ['offline'],
                ],
                '新增活动' => [
                    'url' => 'm-admin/activity/add',
                    'resource' => 'm-admin/activity',
                    'action' => ['add', 'save'],
                ]
            ],

            '订单管理'=>[
                '订单列表'=>[
                    'url' => 'm-admin/order/index',
                    'resource' => 'm-admin/order',
                    'action' => ['index'],
                ],
                '退款申请'=>[
                    'url' => 'm-admin/order/refund',
                    'resource' => 'm-admin/order',
                    'action' => ['index'],
                ],
                '支付流水'=>[
                    'url' => 'm-admin/order/serial',
                    'resource' => 'm-admin/order',
                    'action' => ['index'],
                ],
            ],
            '评论管理'=>[
                '评论列表' =>[
                    'url'   =>  'm-admin/comments/index',
                    'resource'  =>  'm-admin/comments',
                    'action'    =>  ['index,del']
                ]
            ],
            '用户管理'=>[
                '用户列表' =>[
                    'url'   =>  'm-admin/user/index',
                    'resource'  =>  'm-admin/user',
                    'action'    =>  ['index']
                ],
                '讲师列表'=>[
                    'url'   =>  'm-admin/lecturer/index',
                    'resource'  =>  'm-admin/lecturer',
                    'action'    =>  ['index','edit','add']
                ]
            ]
        ],
        'marketing' => [
            '页面管理' => [
                '推荐列表' => [
                    'url' => 'm-admin/marketing/page_index/index',
                    'resource' => 'm-admin/marketing/page_index',
                    'action' => ['index'],
                    'groups' => [
                        [
                            'title' => '缓存更新',
                            'action' => ['generate_config'],
                        ],
                    ],
                ],
            ],
            '优惠券管理'=>[
                '新增优惠券'=>[
                    'url' => 'm-admin/coupons/add',
                    'resource' => 'm-admin/coupons',
                    'action' => ['add'],
                ],
                '优惠券列表'=>[
                    'url' => 'm-admin/coupons/index',
                    'resource' => 'm-admin/coupons',
                    'action' => ['index'],
                ],
            ],
            '微信' => [
                '关键字列表' => [
                    'url' => 'm-admin/wechat_key/index',
                    'resource' => 'm-admin/wechat_key/',
                    'action' => ['index'],
                    'groups' => [
                        [
                            'title' => '添加关键字',
                            'action' => [ 'so_save'],
                        ],
                    ],
                ],
                '公众号设置' => [
                    'url' => 'm-admin/wechat_menu/set',
                    'resource' => 'm-admin/wechat_menu/',
                    'action' => ['save'],
                ],
                '自定义菜单' => [
                    'url' => 'm-admin/wechat_menu/set_menu',
                    'resource' => 'm-admin/wechat_menu/',
                    'action' => ['add','save'],
                ],
            ],
            '客服管理' => [
                '客服列表' => [
                    'url' => 'm-admin/helper/index',
                    'resource' => 'm-admin/helper/',
                    'action' => ['index'],
                ],
                '添加客服' => [
                    'url' => 'm-admin/helper/add',
                    'resource' => 'm-admin/helper/',
                    'action' => ['add','save'],
                ],
            ],
            '场地设施' => [
                '场地列表' => [
                    'url' => 'm-admin/marketing/place/index',
                    'resource' => 'm-admin/marketing/place/',
                    'action' => ['index'],
                ],
                '添加场地' => [
                    'url' => 'm-admin/marketing/place/add',
                    'resource' => 'm-admin/marketing/place/',
                    'action' => ['add','save'],
                ],
            ],
        ],
    ],
];
